void cocktail_sort(int* L,int N) {
	int base = 0, topo = N-1, flag = 0, i, aux;

	while (flag == 0 && base < topo)
	{
		flag = 1;
		for (i = base; i < topo; i++){
			if (L[i] > L[i + 1]){  
				aux = L[i];
				L[i] = L[i + 1];
				L[i + 1] = aux;
				flag = 0;
			}
		}
		topo--;
		for (i = topo; i > base; i--){
			if (L[i] < L[i - 1]){
				aux = L[i];
				L[i] = L[i - 1];
				L[i - 1] = aux;
				flag = 0;
			}
		}
		base++;
	}
}